package com.cat.yygh.hosp.controller.user;

import com.cat.yygh.common.result.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

@Api(tags = "后台用户用户")
@RestController
@RequestMapping("/admin/user")
public class UserController {
    @PostMapping("/login")
    public R login(){
        return R.ok().data("token","admin-token");
    }
    @GetMapping("/info")
    public R info(){
        return R.ok()
                .data("roles","[admin]")
                .data("introduction","I am a super administrator")
                .data("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif")
                .data("name","猫");
    }
    @PostMapping("/logout")
    public R logout(){
        return R.ok().data("token","admin-token");
    }
}
